/**
 *
 */
package org.suren.littlebird.actions.bundle;

import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.suren.littlebird.Activator;
import org.suren.littlebird.actions.Reload;

/**
 * @author suren
 *
 */
public class SuRenBundleReloadAction extends Action implements
		ISelectionChangedListener
{
	private Reload reload;

	/**
	 * @param bundleReload
	 */
	public SuRenBundleReloadAction(Reload bundleReload)
	{
		this.reload = bundleReload;
	}

	@Override
	public String getText()
	{
		return "&Reload";
	}

	@Override
	public ImageDescriptor getImageDescriptor()
	{
		return Activator.getImageDescriptor("icons/reload.gif");
	}

	@Override
	public void run()
	{
		if(reload != null)
		{
			reload.reload(null, null);
		}
	}

	@Override
	public void selectionChanged(SelectionChangedEvent arg0)
	{
	}

}
